using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class Settings
{
    #region UNITS
    public const float pixelsPerUnit = 16f;
    public const float tileSizePixels = 16f;
    #endregion
    
    #region DUNGEON BUILD SETTINGS
    public const int maxDungeonRebuildAttemptsForRoomGraph = 1000;
    public const int maxDungeonBuildAttempts = 10;
    #endregion
    
    #region ROOM SETTINGS
    public const float fadeInTime = 0.5f; // 是时候在房间里淡入淡出了
    public const int maxChildCorridors = 3; // 从房间通向儿童走廊的最大数量。- 最大值应为 3，但不建议这样做，因为它可能会导致地牢建筑失败，因为房间更有可能无法组合在一起;
    public const float doorUnlockDelay = 1f;
    #endregion
    
    #region ANIMATOR PARAMETERS
    // 动画器参数 - 玩家
    public static int aimUp = Animator.StringToHash("aimUp");
    public static int aimDown = Animator.StringToHash("aimDown");
    public static int aimUpRight = Animator.StringToHash("aimUpRight");
    public static int aimUpLeft = Animator.StringToHash("aimUpLeft");
    public static int aimRight = Animator.StringToHash("aimRight");
    public static int aimLeft = Animator.StringToHash("aimLeft");
    public static int isIdle = Animator.StringToHash("isIdle");
    public static int isMoving = Animator.StringToHash("isMoving");
    public static int rollUp = Animator.StringToHash("rollUp");
    public static int rollRight = Animator.StringToHash("rollRight");
    public static int rollLeft = Animator.StringToHash("rollLeft");
    public static int rollDown = Animator.StringToHash("rollDown");
    public static int flipUp = Animator.StringToHash("flipUp");
    public static int flipRight = Animator.StringToHash("flipRight");
    public static int flipLeft = Animator.StringToHash("flipLeft");
    public static int flipDown = Animator.StringToHash("flipDown");
    public static int use = Animator.StringToHash("use");
    public static float baseSpeedForPlayerAnimations = 8f;
    
    // 动画师参数 - 敌人
    public static float baseSpeedForEnemyAnimations = 3f;
    
    // 动画器参数 - 门
    public static int open = Animator.StringToHash("open");
    
    // 动画器参数 - DamageableDecoration
    public static int destroy = Animator.StringToHash("destroy");
    public static String stateDestroyed = "Destroyed";
    
    #endregion
    
    #region GAMEOBJECT TAGS
    public const string playerTag = "Player";
    public const string playerWeapon = "playerWeapon";
    #endregion
    
    #region AUDIO
    public const float musicFadeOutTime = 0.5f;  // 默认音乐淡出过渡
    public const float musicFadeInTime = 0.5f;  // 默认音乐淡入过渡
    #endregion
    
    #region FIRING CONTROL
    public const float useAimAngleDistance = 3.5f; // 如果目标距离小于此距离，则将使用瞄准角（从玩家计算），否则将使用武器瞄准角（从武器计算）. 
    #endregion
    
    #region ASTAR PATHFINDING PARAMETERS
    public const int defaultAStarMovementPenalty = 40;
    public const int preferredPathAStarMovementPenalty = 1;
    public const int targetFrameRateToSpreadPathfindingOver = 60;
    public const float playerMoveDistanceToRebuildPath = 3f;
    public const float enemyPathRebuildCooldown = 2f;

    #endregion
    
    #region ENEMY PARAMETERS
    public const int defaultEnemyHealth = 20;
    #endregion

    #region UI PARAMETERS
    public const float uiHeartSpacing = 16f;
    public const float uiAmmoIconSpacing = 4f;
    #endregion
    
    #region CONTACT DAMAGE PARAMETERS
    public const float contactDamageCollisionResetDelay = 0.5f;
    #endregion
    
    #region HIGHSCORES
    public const int numberOfHighScoresToSave = 100;
    #endregion
}
